
import os




def teaching_html():
    # Construct the path to teaching.html relative to the current file
    html_file_path = os.path.join(os.path.dirname(__file__), "..", "Txt", "teaching.html")
    try:
        with open(html_file_path, 'r', encoding='utf-8') as f:
            html_content = f.read()
        return html_content
    except FileNotFoundError:
        return f"Error: {html_file_path} not found."
    except Exception as e:
        return f"Error reading {html_file_path}: {str(e)}"

def head_html():
    # Construct the path to Head.html relative to the current file
    html_file_path = os.path.join(os.path.dirname(__file__), "..", "Txt", "Head.html")
    try:
        with open(html_file_path, 'r', encoding='utf-8') as f:
            html_content = f.read()
        return html_content
    except FileNotFoundError:
        return f"Error: {html_file_path} not found."
    except Exception as e:
        return f"Error reading {html_file_path}: {str(e)}"

def adhtml():
    # Construct the path to adhtml.html relative to the current file
    html_file_path = os.path.join(os.path.dirname(__file__), "..", "Txt", "adhtml.html")
    try:
        with open(html_file_path, 'r', encoding='utf-8') as f:
            html_content = f.read()
        return html_content
    except FileNotFoundError:
        return f"Error: {html_file_path} not found."
    except Exception as e:
        return f"Error reading {html_file_path}: {str(e)}"

